﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;

namespace RabbitMQ_Test.Controllers
{
    public class HomeController : AsyncController
    {
        public async Task<ActionResult> Index()
        {
            bool? value1 = false;
            value1 = await RabbitMQUtility.Producer("测试"+DateTime.Now.ToString());
            value1 = await RabbitMQUtility.Producer("测试" + DateTime.Now.ToString());
            value1 = await RabbitMQUtility.Producer("测试" + DateTime.Now.ToString());
            value1 = await RabbitMQUtility.Producer("测试" + DateTime.Now.ToString());
            value1 = await RabbitMQUtility.Producer("测试" + DateTime.Now.ToString());
            value1 = await RabbitMQUtility.Producer("测试" + DateTime.Now.ToString());
            value1 = await RabbitMQUtility.Producer("测试" + DateTime.Now.ToString());
            value1 = await RabbitMQUtility.Producer("测试" + DateTime.Now.ToString());
            value1 = await RabbitMQUtility.Producer("测试" + DateTime.Now.ToString());
            string value2 = await RabbitMQUtility.Consumer();
            return Content(value1.ToString() + "<br />" + value2);
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}